﻿using RpcCacheModular;

namespace AutoTask.Service
{
    public class AutoTaskService
    {
        public static  void InitService()
        {
            RpcClient.RpcClient.LoadModular<CacheModular>();
            RpcClient.RpcClient.Load("AutoTask.Service");
            RpcClient.RpcClient.InitComplate += RpcClient_InitComplate;
            RpcClient.RpcClient.Start();
        }

        private static void RpcClient_InitComplate()
        {
            ITaskService service = RpcClient.RpcClient.Unity.Resolve<ITaskService>();
            service.Init();
        }
    }
}
